package com.fqgj.sentry.controller.pc.request;

import com.fqgj.sentry.common.exception.BizException;
import com.fqgj.sentry.common.exception.enums.ErrorCodeEnums;
import com.fqgj.sentry.common.request.ParamsObject;

/**
 * Created by ykpbean kangping.ying@yuntu-inc.com
 *
 * @description
 * @create 2017-08-01 上午9:30
 */


public class AddExecuteResultVo extends ParamsObject {
    /**
     * 策略集id
     */
    private Long policySetsId;
    /**
     * 执行结果
     */
    private String result;
    /**
     * 结果描述
     */
    private String resultDesc;
    /**
     * 优先级
     */
    private Integer level;
    /**
     * 1:默认 2：自定义
     */
    private Integer type;
    /**
     * 结果类型：1:拒绝  2:人工 3:通过
     */
    private Integer resultType;

    @Override
    public void validate() {

        if (result == null || level == null || resultType == null) {
            throw new BizException(ErrorCodeEnums.param_valid_error);
        }
    }

    public Long getPolicySetsId() {
        return policySetsId;
    }

    public AddExecuteResultVo setPolicySetsId(Long policySetsId) {
        this.policySetsId = policySetsId;
        return this;
    }

    public String getResult() {
        return result;
    }

    public AddExecuteResultVo setResult(String result) {
        this.result = result;
        return this;
    }

    public String getResultDesc() {
        return resultDesc;
    }

    public AddExecuteResultVo setResultDesc(String resultDesc) {
        this.resultDesc = resultDesc;
        return this;
    }

    public Integer getLevel() {
        return level;
    }

    public AddExecuteResultVo setLevel(Integer level) {
        this.level = level;
        return this;
    }

    public Integer getType() {
        return type;
    }

    public AddExecuteResultVo setType(Integer type) {
        this.type = type;
        return this;
    }

    public Integer getResultType() {
        return resultType;
    }

    public AddExecuteResultVo setResultType(Integer resultType) {
        this.resultType = resultType;
        return this;
    }
}
